package com.magicborrow.utils;

import android.app.Activity;
import android.content.Context;
import android.content.SharedPreferences;

/**
 * Created by gaoweiwei on 15/5/13.
 */
public class CacheUtil {

    public static String getHisRecord(Context context) {

        SharedPreferences sharedPreferences = context.getSharedPreferences("hisRecord", Activity.MODE_PRIVATE);
        return sharedPreferences.getString("records", "");
    }

    public static void saveHisRecord(Context context, String couponJson) {
        SharedPreferences sharedPreferences = context.getSharedPreferences("hisRecord", Activity.MODE_PRIVATE);
        sharedPreferences.edit().putString("records", couponJson).commit();

    }
}
